<template>
  <div>
    <el-form
      :inline="true"
      label-position="right"
      size="small"
      label-width="110px"
      class="filter-form-inline"
    >
      <el-row :gutter="40" style="margin-left: 0px; margin-right: 0px">
        <el-col :span="24" style="padding-left: 0;padding-right: 0">
          <item-title title="基本信息" />
        </el-col>
        <el-col :lg="8" :xs="4">
          <el-form-item label="兼职人员姓名：">
            <span>{{ formData.agent.userName }}</span>
          </el-form-item>
        </el-col>
        <el-col :lg="8" :xs="4">
          <el-form-item label="性别：" class="item_col">
            <span v-if="formData.agent.sex === '1'">男</span>
            <span v-if="formData.agent.sex === '2'">女</span>
          </el-form-item>
        </el-col>
        <el-col :lg="8" :xs="4">
          <el-form-item label="联系电话：">
            <span>{{ formData.agent.tel }}</span>
          </el-form-item>
        </el-col>
        <el-col :lg="8" :xs="4">
          <el-form-item label="身份证：">
            <span>{{ formData.agent.cardNumber }}</span>
          </el-form-item>
        </el-col>
        <el-col :lg="8" :xs="4">
          <el-form-item label="创建人：">
            <span>{{ formData.agent.creatorName }}</span>
          </el-form-item>
        </el-col>
        <el-col :lg="8" :xs="4">
          <el-form-item label="创建时间：">
            <span>  {{ dateFormat("yyyy-mm-dd HH:MM:SS",formData.agent.createdAt) }}</span>
          </el-form-item>
        </el-col>
        <el-col :lg="24" :xs="4">
          <el-form-item label="身份证附件：">
            <div v-for="(item,index) in formData.agent.cardFiles" :key="index" class="file-item">
              <image-upload-view disabled="true" :data="item" :disabled="disabled" />
            </div>
          </el-form-item>
        </el-col>
        <!--        <el-col :span="24" style="padding-left: 0;padding-right: 0">-->
        <!--          <item-title title="合同信息"/>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="8" :xs="4">-->
        <!--          <el-form-item label="合同名称：">-->
        <!--            <span>{{formData.contract.contractName}}</span>-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="8" :xs="4">-->
        <!--          <el-form-item label="合同类型：">-->
        <!--            <span>-->
        <!--              {{getLabel('contract_type', formData.contract.contractObjectType)}}-->
        <!--            </span>-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="8" :xs="4">-->
        <!--          <el-form-item label="合同开始日期：">-->
        <!--            <span>{{formData.contract.contractBeginTime}}</span>-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="8" :xs="4">-->
        <!--          <el-form-item label="合同结束日期：">-->
        <!--            <span>{{formData.contract.contractEndTime}}</span>-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="8" :xs="4">-->
        <!--          <el-form-item label="合同负责人：">-->
        <!--            <span>{{formData.contract.contractHeadName}}</span>-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="8" :xs="4">-->
        <!--          <el-form-item label="归属部门：">-->
        <!--            <span>{{formData.contract.contractDepartmentName}}</span>-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="8" :xs="4">-->
        <!--          <el-form-item label="创建人：">-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
        <!--        <el-col :lg="16" :xs="4">-->
        <!--          <el-form-item label="合同附件：">-->
        <!--            <div style="display: flex;justify-content: flex-start;align-items: flex-start;flex-wrap: wrap;">-->
        <!--              <div v-for="(item,index) in formData.contract.contractFile" :key="index" style="margin-right: 20px">-->
        <!--                <el-button type="text" @click="handlDownload(item)">-->
        <!--                  {{item.name}}-->
        <!--                </el-button>-->
        <!--              </div>-->
        <!--            </div>-->
        <!--          </el-form-item>-->
        <!--        </el-col>-->
      </el-row>
    </el-form>
  </div>
</template>

<script>
import {downloadFile} from '@/utils/downloadFile'

export default {
  name: 'DetailedInformation',
  props: {
    formData: {
      type: Object,
      defaults() {
        return {
          agent: {},
          contract: {}
        }
      }
    }
  },
  setup() {
    const handlDownload = (url) => {
      downloadFile(url.url)
    }
    return {
      handlDownload
    }
  }
}

</script>

<style scoped>
  /* @import url(); 引入css类 */
</style>
